﻿/********************************************************************************************************************
* Author:	Christos Polydorou																						*
* Email:	std04237@di.uoa.gr																						*
* Purpose:	This script is used in order to create the stored procedure "usp_getuserdata" that returns all columns *
*			from the user with the specified username.																*
********************************************************************************************************************/

CREATE PROCEDURE [dbo].[usp_getuserdata]
	@userid bigint
AS
	SELECT username,email,LastLogin,Usertype,fname,lname,password
	FROM Users
	WHERE Users.id = @userid
RETURN 0